| Conditions | 1 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import {chat_v1 as chatV1} from 'googleapis/build/src/apis/chat/v1'; |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Creates an action response. |
||
| 5 | * Action Response is parameter that a Chat app can use to configure how its |
||
| 6 | * response is posted. |
||
| 7 | * ref: https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#actionresponse |
||
| 8 | * |
||
| 9 | * @param {string} message - Number of votes for this option |
||
| 10 | * @param {string} status - Status of |
||
| 11 | * @returns {object} - ActionResponse |
||
| 12 | */ |
||
| 13 | export function createStatusActionResponse(message: string, status = 'OK') { |
||
| 14 | return { |
||
| 15 | actionResponse: { |
||
| 16 | type: 'DIALOG', |
||
| 17 | dialogAction: { |
||
| 18 | actionStatus: { |
||
| 19 | statusCode: status, |
||
| 46 |